package com.zzc.legou.service.item.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zzc.legou.core.service.impl.CrudServiceImpl;
import com.zzc.legou.item.entity.Category;
import com.zzc.legou.service.item.service.ICategoryService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ICategoryServiceImpl extends CrudServiceImpl<Category> implements ICategoryService {
    @Override
    public List<Category> queryNameByIds(List<Long> ids) {
        Category category = baseMapper.selectById(76);
        System.out.println("category = " + category);
        LambdaQueryWrapper<Category> wrapper = Wrappers.lambdaQuery(Category.class).in(Category::getId, ids);
        List<Category> list = this.baseMapper.selectList(wrapper);
        return list;
    }
}
